package com.zuihai.app.mvp.model.api.Shuoshuo;

import com.zuihai.app.mvp.model.entity.BaseJson;
import com.zuihai.app.mvp.model.entity.BaseMainClass;
import com.zuihai.app.mvp.model.entity.Detail;
import com.zuihai.app.mvp.model.entity.MessageResponse;
import com.zuihai.app.mvp.model.entity.DianzanListResult;
import com.zuihai.app.mvp.model.entity.InquireShuoshuoResult;
import com.zuihai.app.mvp.model.entity.ShuoshuoDetailResult;

import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;

/**
 * Created by Administrator on 2017/5/9 0009.
 */

public interface IInquireShuoshuo {

    /**
     * 评论点赞
     *
     * @param id       被点赞ID
     * @param userId   用户ID
     * @param isFavour 1:点赞，2：取消点赞
     * @return
     */
    @FormUrlEncoded
    @POST("Dianzan_clickInq?type=3")
    Observable<MessageResponse> commentFavour(@Field("tiaomu_id") String id, @Field("my_id") String userId, @Field("cancel") int isFavour, @Field("releaser_id") String releaserId);

    //说说列表
    @FormUrlEncoded
    @POST("ShuoshuoInq")
    Observable<BaseJson<InquireShuoshuoResult>> getItemData(@Field("page") int page ,@Field("my_id") String id);
    //说说详情
    @FormUrlEncoded
    @POST("Shuoshuo_clickInq")
    Observable<BaseJson<ShuoshuoDetailResult>> getDetailData(@Field("id") String id ,
                                                             @Field("my_id") String my_id,
                                                             @Field("page") int page);
    //点赞列表
    @FormUrlEncoded
    @POST("Dianzan_listInq")
    Observable<BaseJson<DianzanListResult>> getDianzanList(@Field("my_id") String  my_id ,
                                                           @Field("tiaomu_id") String tiaomu_id,
                                                           @Field("page") int page,
                                                           @Field("dianzan_Tag") int tag);


    //我的说说列表
    @FormUrlEncoded
    @POST("MyShuoshuo_clickInq")
    Observable<BaseJson<InquireShuoshuoResult>> getMyShuoshuoItemData(@Field("page") int page , @Field("my_id") String id);

    //个人主页说说列表
    @FormUrlEncoded
    @POST("MyShuoshuo_clickInq")
    Observable<BaseJson<InquireShuoshuoResult>> homepagerShuoshuoItemData(@Field("page") int page ,
                                                                          @Field("my_id") String id,
                                                                          @Field("friend_id")String friendId);


    //发现 - 》我的说说列表
    @FormUrlEncoded
    @POST("MyShuoshuo_clickInq")
    Observable<BaseJson<InquireShuoshuoResult>> getMyShuoshuoItemData(@Field("page") int page ,
                                                                      @Field("my_id") String id,
                                                                      @Field("type")String type);


    //评论列表加载
    @FormUrlEncoded
    @POST("Pinglun_listInq")
    Observable<BaseJson<Detail.Comment>> getCommentList(@Field("id") String id ,
                                                        @Field("my_id") String my_id,
                                                        @Field("page") int page);

    //Tag  1去处  2 说说  3.头条  4.发现   5.服务   6  商品   7.评论
    //cancel  1点赞 2取消点赞
    @FormUrlEncoded
    @POST("Dianzan_clickInq")
    Observable<BaseMainClass> getDianzan(@Field("my_id") String my_id,
                                         @Field("tiaomu_id") String tiaomu_id,
                                         @Field("type") int dianzan_Tag,
                                         @Field("cancel") int cancle);





    /**
     * 添加评论
     *
     * @param id
     * @param userId
     * @param comment
     * @return
     */
    @FormUrlEncoded
    @POST("AddPinglunInq")
    Observable<BaseJson<Detail.Comment>> requestAddComment(@Field("tiaomu_id") String id,
                                                           @Field("my_id") String userId,
                                                           @Field("content") String comment,
                                                           @Field("releaser_id") String release_id,
                                                           @Field("picture") String picture,
                                                           @Field("type") String type);


    //访客删除接口
    @FormUrlEncoded
    @POST("Fangke_DeleteInq")
    Observable<BaseMainClass> visitorDelect(@Field("tiaomu_id") String tiaomuID);


    //删除说说接口
    @FormUrlEncoded
    @POST("Shuoshuo_DeleteInq")
    Observable<BaseMainClass> deleteShuoshuo(@Field("id") String tiaomuID);

    //删除我发布的的接口
    @FormUrlEncoded
    @POST("Delete_MyReleaseInq")
    Observable<BaseMainClass> deleteMyRelease(@Field("tiaomu_id") String tiaomuID
            ,@Field("type") String type);


    /**
     * 举报新接口举报
     *
     * @param id
     * @param userId
     * @param inform
     * @return
     */
    @FormUrlEncoded
    @POST("Jubao_clickInq")
    Observable<MessageResponse> requestInform(@Field("tiaomu_id") String id,
                                              @Field("my_id") String userId,
                                              @Field("content") String inform,
                                              @Field("type") String type);

    /**
     * 回复评论
     *
     * @return
     */
    @FormUrlEncoded
    @POST("AddHuifu")
    Observable<BaseJson<Detail.ReplyComment>> replyComment(@Field("releaser_id") String releaserId,
                                                           @Field("tiaomu_id") String id,
                                                           @Field("my_id") String userId,
                                                           @Field("content") String content,
                                                           @Field("be_huifu_id") String beihuifu,
                                                           @Field("picture") String picture);


    /**
     * 删除评论
     */
    @FormUrlEncoded
    @POST("Shuoshuo_Pinglun_DeleteInq")
    Observable<MessageResponse> deleteComment(@Field("id") String id);

}
